package com.junittest.code;

import java.util.Calendar;

public class Box {
	
	private String boxName;
	private int boxWidth, boxLength, boxHeight, boxWeight;
	
	public Box(String boxName, int boxWidth, int boxLength, int boxHeight, int boxWeight) 
	{
		this.boxName = boxName;
		this.boxWidth = boxWidth;
		this.boxLength = boxLength;
		this.boxHeight = boxHeight;
		this.boxWeight = boxWeight;
	}
	
	public String getName()
	{
		return this.boxName;
	}
	
	public int getBoxVolume()
	{
		return this.boxWidth * this.boxLength * this.boxHeight;
	}
	
	public int getBoxSize(String axisA, String axisB) {
		if(axisA != axisB) {
			if(axisA != "X" && axisB != "X") {
				return this.boxLength * this.boxHeight;
			}
			if(axisA != "Y" && axisB != "Y") {
				return this.boxWidth * this.boxHeight;
			}
			if(axisA != "Z" && axisB != "Z") {
				return this.boxWidth * this.boxLength;
			}
		}
		return 0;
	}
	
	public int getBoxDensity() {
		return this.boxWeight / this.boxWidth * this.boxLength * this.boxHeight;
	}
}
